﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<nelech.Models.DBModel.Marquee>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	צור הודעה
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">

    <script src="../../Scripts/tinymce/jscripts/tiny_mce/tiny_mce.js" type="text/javascript"></script>

    <script type="text/javascript">


       
        
        tinyMCE.init({ 
           
           theme: "advanced",
                mode: "exact",
                language: "he",
                elements: "text",
                plugins: "",
                theme_advanced_buttons1_add_before: "forecolor,backcolor,copy,paste,fontselect", theme_advanced_toolbar_location: "top",
                theme_advanced_toolbar_location: "top",
                theme_advanced_toolbar_align: "left",
                theme_advanced_styles: "NormalBold 1=firstBold;Normal 2=first;Normal 3=second;", 
                theme_advanced_more_colors : true,
               
          
            content_css: "/Content/tinymce.css"
        });


       
      
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>צור הודעה</h2>
 <%= Html.ValidationSummary() %>
    <% using (Html.BeginForm(this.Model == null ? "CreateMarquee" : "EditMarquee", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" /*, onsubmit = "SerializeMCE()"*/ }))
       {%>


        <fieldset>
            <legend>שדות:</legend>
             <%
        if (Model != null)
        {
        %>
        <input type="hidden" name="id" value="<%= Model.id %>" />
       
        <%
        }
        %>

            <p>
            <label for="title">כותרת:</label>
              
               
                 <%= Html.TextBox("title", this.Model == null || this.Model.title == null ? string.Empty : this.Model.title.ToString())%>
         <%= Html.ValidationMessage("title")%>
           </p> 
           <p>
            <label for="description">
                פרטים:</label>
            <%= Html.TextArea("text", new {rows="15", cols="80", id="text"})%>
        </p>
        <p>
                <input type="submit" value="שמור" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("חזור לרשימה", "ListMarquee") %>
    </div>
</asp:Content>

